<% 
  id = country_item.id
  has_image = !country_item.image_url.nil?
%>
<div class="country_item" >
  <p><%= country_item.name %></p>
  <% if has_image -%>
    <div class="flag" ><%= image_tag url_for_file_column(country_item, :image_url) %></div>
    <div class="remove_flag" ><%= link_to(image_tag("remove_flag.gif"), 
      {:action => :remove_image, :id => id}, :confirm => "Are you sure?") %></div>
    <div class="clear_float_left" ></div>
  <% end -%>
  <div>
    <%= form_tag({:action => :upload_image, :id => id}, {:multipart => true}) %>
      <p>
       <input name="country_item[image_url_temp]" type="hidden" />
       <input name="country_item[image_url]" size="30" type="file" />
      <%= submit_tag "Upload" %>
      </p>
    <%= end_form_tag %>
  </div>
</div>